package org.eliza.base.keywords


fun main(): Unit {
    println(add(1, 2))
    println(ok()(1, 2))
    val bad1 = bad() { x, y ->
        x + y
    }
    println(bad)
}

val ok = fun(): (Int, Int) -> Int {
    return add
}
val bad = fun(func: (Int, Int) -> Int): Int {
    val x = 1
    val y = 2
    return func(x, y)
}
val add = fun(x: Int, y: Int): Int {
    return x + y
}